<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body id="content">
		<script>
			function Person(name,chinese,mathsc){
				this.name=name;
				this.chinese=chinese;
				this.mathsc=mathsc;
			}
			Person.prototype.showname=function(){
				return(this.name);
			}
			Person.prototype.showChinese=function(){
				return(this.chinese);
			}
			Person.prototype.showMath=function(){
				return(this.mathsc);
			}
			function Student(name,chinese,mathsc,age){
				Person.call(this,name,chinese,mathsc);
				this.age=age;	
			}
			Student.prototype=new Person();
			Student.prototype.showAge=function(){
				return(this.age);
			}
			var zs=new Student("张三",98,80,25);
			var pc=document.createElement("p");
			pc.innerHTML="姓名："+zs.showname()+"<br/>语文："+zs.showChinese()+"<br/>数学："+zs.showMath()+"<br/>年龄："+zs.showAge();
			var content=document.getElementById("content");
			content.appendChild(pc);
		</script>
	</body>
</html>
